/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#ifndef __NOISE_DATA_SOURCE_H__
#define __NOISE_DATA_SOURCE_H__


namespace liba
{
namespace noise
{

class DataSource
{
public:
	enum Type { MONO, STEREO_LEFT, STEREO_RIGHT, SURROUND_FRONTLEFT, SURROUND_FRONTRIGHT, SURROUND_REARLEFT, SURROUND_REARRIGHT, SURROUND_SUBWOOFER, SURROUND_CENTER };

	virtual ~DataSource()
	{}
	virtual bool has_native(Type channel)=0;
	virtual int get_frequency()=0;
	// return 0 if the length has no meaning
	virtual int get_length()=0;

	// returns number of samples decoded. 0 means end of noise
	virtual int decode(int samples)=0;
	virtual void get_data(Type channel, void * dst, int dst_stride, int dst_bits)=0;
};

} // namespace noise
} // namesapce liba
using namespace liba;

#endif //__NOISE_DATA_SOURCE_H__

